package model.Actions;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import DB.Connection.DBConnectionManager;

import commons.Entities.Review;

import controller.ControllerFunctions;

public class addNewCharacterReviewAction implements Runnable {

	private static final Log logger = LogFactory.getLog(addCharacterCommentAction.class);

	private Review review;

	public addNewCharacterReviewAction(Review review) {
		this.review = review;
	}

	@Override
	public void run() {
		logger.info("addNewCharacterReviewAction starting...");

		DBConnectionManager.get().insertNewCharacterReview(review);
		ControllerFunctions.get().getCharacterReview(review.getCharacterID());

		logger.info("addNewCharacterReviewAction ended.");
	}
}
